package com.zxy.study.ui.activity;

import android.opengl.GLSurfaceView;
import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.zxy.study.R;
import com.zxy.study.ui.opengl.XYRender;

import butterknife.BindView;
import butterknife.ButterKnife;


/*
 *  @项目名：  study
 *  @包名：    com.zxy.study
 *  @文件名:   OpenGLActivity
 *  @创建者:   zhangxy
 *  @创建时间:  2019/8/12 9:57
 *  @描述：    TODO
 */
public class OpenGLActivity extends AppCompatActivity {

	@BindView(R.id.gl_surface)
	GLSurfaceView mGLSurfaceView;

	@Override
	protected void onCreate(@Nullable Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_opengl);

		ButterKnife.bind(this);

		mGLSurfaceView.setEGLContextClientVersion(2);
		mGLSurfaceView.setRenderer(new XYRender(this));
	}


	@Override
	protected void onPause() {
		super.onPause();
		mGLSurfaceView.onPause();
	}

	@Override
	protected void onResume() {
		super.onResume();
		mGLSurfaceView.onResume();
	}
}
